<!-- 新品推荐 -->
<style type="text/less">
    @import "/web/public/public.less";
    .recommend-products{
        &>.title{
            border-bottom: 1px solid #EEEEEE;
            line-height: 60px;
        }
        .slide-pic{
            width: 100%;
            height: 300px;
            position: relative;
            margin-top: 10px;
            .swiper-slide{
                position: relative;
                img{
                    width: 100%;
                    height: 100%;
                }
                .title{
                    width: 100%;
                    position: absolute;
                    color: #ffffff;
                    top: 240px;
                    left: 0;
                    line-height: 60px;
                    font-size: 20px;
                    padding-left: 10px;
                    .bg('/web/img/banner-bg.png');
                    background-size: 100%;
                }
            }

            .pagination {
                position: absolute;
                z-index: 20;
                bottom: 30px;
                width: 100%;
                text-align: left;
                padding-left: 75px;
            }
            .swiper-pagination-switch {
                display: inline-block;
                width: 12px;
                height: 12px;
                border-radius: 8px;
                background: #A8A8A8;
                margin: 0 5px;
                opacity: 0.8;
                border: 1px solid #fff;
                cursor: pointer;
            }
            .swiper-active-switch {
                width: 21px;
                background: #fff;
            }
            .swiper_btn{
                width: 40px;
                height: 70px;
                position: absolute;
                top: 50%;
                margin-top: -35px;


                &.swiper-button-prev{
                    left: 0;
                    .bg('/web/img/slider-arrow.png');
                    transform: rotate(180deg);
                }
                &.swiper-button-next{
                    right: 0;
                    .bg('/web/img/slider-arrow.png');
                }
            }
        }
        .deep-img-list{
            margin-top: 18px;
            &>li{
                display: inline-block;
                width: 220px;
                height: 133px;
                position: relative;
                overflow: hidden;
                text-align: left;
                margin-left: 5px;
                &:nth-of-type(3n+1){
                    margin-left: 0;
                }
                img{
                    width: 100%;
                    height: 100%;
                }
                .title{
                    display: inline-block;
                    width: 190px;
                    .ellipsis;
                    font-size: 14px;
                    color: #fff;
                    background: url("/web/img/video-img-bg.png");
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    line-height: 40px;
                    padding: 0 15px;
                }
                .deep-read{
                    width: 86px;
                    height: 22px;
                    background-color: #959c9f;
                    position: absolute;
                    top: 38px;
                    left: 0;
                    font-size: 12px;
                    color: #fff;
                    transform-origin: left bottom;
                    transform: rotate(-45deg);
                    text-align: center;
                    line-height: 22px;
                }
            }
        }
        .content-list{
            &>li{
                border-bottom: 1px solid #EEEEEE;
                padding: 20px 0;
                .clearfix;
                .left{
                    width: 230px !important;
                    height: 140px !important;
                    min-height: 0 !important;
                    padding: 0 !important;
                    .fl;
                    img{
                        width: 100%;
                        height: 100%;
                    }
                    &+.right{
                        width: 435px !important;
                        .fr;
                    }
                }
                .right{
                    min-height: 0 !important;
                    .title{
                        width: 100%;
                        font-size: 20px;
                        font-weight: normal;
                        .ellipsis;
                    }
                    p{
                        height: 45px;
                        color: #7f7f7f;
                        font-size: 14px;
                        line-height: 24px;
                        margin-top: 15px;
                        .ellipsis-mult(2);
                    }
                    .info{
                        height: 27px;
                        overflow: hidden;
                        margin-top: 30px;
                        font-size: 14px;
                        color: #a8a8a8;
                        .clearfix;
                        line-height: 26px;
                        i{
                            margin-left: 20px;
                            &:first-child{
                                margin-left: 0;
                            }
                            &+span{
                                margin-left: 5px;
                            }
                        }
                        a{
                            display: inline-block;
                            color: #a8a8a8;
                            background-color: #F0F0F0;
                            border-radius: 13px;
                            padding: 0 13px;
                            .fr;
                            margin-left: 10px;
                            &:last-child{
                                margin-left: 0;
                            }
                        }
                    }
                }
            }

        }
    }
</style>
<script src="/web/lib/less.min.js"></script>
<#if channel1.channelStatus == 1 || channel2.channelStatus == 1 || channel3.channelStatus == 1>
    <div class="recommend-products">
        <div class="title">
            <h2 class="title_h2">
                <i class="title-line"></i>
                <a href="javascript:">${channel1.channelName}</a>
            </h2>
        </div>
        <#if channel1.channelStatus == 1 && list1??>
            <div class="slide-pic swiper-container">
                <div class="swiper-wrapper">
                    <#list list1 as info>
                        <div class="swiper-slide">
                            <#if info.articleOutLinkStatus == 1>
                                <a href="${info.articleOutLink}" target="_blank" title="${info.articleTitleImageAlt}">
                                    <img src="${info.articleTitleImage}" alt="${info.articleTitleImageAlt}" title="${info.articleTitleImageAlt}">
                                </a>
                            <#else>
                                <a href="${info.articleUrl}" target="_blank" title="${info.articleTitleImageAlt}">
                                    <img src="${info.articleTitleImage}" alt="${info.articleTitleImageAlt}" title="${info.articleTitleImageAlt}">
                                </a>
                            </#if>
                        </div>
                    </#list>
                </div>
                <div class="pagination"></div>
                <div class="swiper-button-prev swiper_btn"></div>
                <div class="swiper-button-next swiper_btn"></div>
            </div>
        </#if>
        <#if channel2.channelStatus == 1 && list2??>
            <ul class="deep-img-list">
                <#list list2 as info>
                    <li>
                        <#if info.articleOutLinkStatus == 1>
                            <a href="${info.articleOutLink}" target="_blank" title="${info.articleTitle}">
                                <img src="${info.articleTitleImage}" alt="${info.articleTitleImageAlt}" title="${info.articleTitleImageAlt}">
                            </a>
                            <h3><a class="title" href="${info.articleOutLink}" target="_blank" title="${info.articleTitle}">${info.articleTitle}</a></h3>
                        <#else>
                            <a href="${info.articleUrl}" target="_blank" title="${info.articleTitle}">
                                <img src="${info.articleTitleImage}" alt="${info.articleTitleImageAlt}" title="${info.articleTitleImageAlt}">
                            </a>
                            <h3><a class="title" href="${info.articleUrl}" target="_blank" title="${info.articleTitle}">${info.articleTitle}</a></h3>
                        </#if>
                    </li>
                </#list>
            </ul>
        </#if>
        <#if channel3.channelStatus == 1 && list3??>
            <ul class="content-list">
                <#list list3 as info>
                    <#if info.articleOutLinkStatus == 1>
                        <li>
                            <div class="left">
                                <a href="${info.articleOutLink}" target="_blank" title="${info.articleTitle}"><img src="${info.articleTitleImage}" alt="${info.articleTitleImageAlt}" title="${info.articleTitleImageAlt}"></a>
                            </div>
                            <div class="right">
                                <h3 class="title"><a href="${info.articleOutLink}" target="_blank" title="${info.articleTitle}">${info.articleTitle}</a></h3>
                                <p><a href="${info.articleOutLink}" target="_blank" title="${info.articleInfo}">${info.articleInfo}</a></p>
                                <div class="info">
                                    <i class="iconfont icon-shijian"></i><span>${info.updateTime}</span>
                                    <#list info.articleKeyWordList as articleKeyword>
                                        <a href="${"${domain}/web/tagList/1.html?tag=${articleKeyword.keyword}"}" target="_blank" class="tag" title="${articleKeyword.keyword}">${articleKeyword.keyword}</a>
                                    </#list>
                                </div>
                            </div>
                        </li>
                    <#else>
                        <li>
                            <div class="left">
                                <a href="${info.articleUrl}" target="_blank" title="${info.articleTitle}"><img src="${info.articleTitleImage}" alt="${info.articleTitleImageAlt}" title="${info.articleTitleImageAlt}"></a>
                            </div>
                            <div class="right">
                                <h3 class="title"><a href="${info.articleUrl}" target="_blank" title="${info.articleTitle}">${info.articleTitle}</a></h3>
                                <p><a href="${info.articleUrl}" target="_blank" title="${info.articleInfo}">${info.articleInfo}</a></p>
                                <div class="info">
                                    <i class="iconfont icon-shijian"></i><span>${info.updateTime}</span>
                                    <#list info.articleKeyWordList as articleKeyword>
                                        <a href="${"${domain}/web/tagList/1.html?tag=${articleKeyword.keyword}"}" target="_blank" class="tag" title="${articleKeyword.keyword}">${articleKeyword.keyword}</a>
                                    </#list>
                                </div>
                            </div>
                        </li>
                    </#if>
                </#list>
            </ul>
        </#if>
    </div>
</#if>
<script>
    $(function () {
        var slidIndex = 0;
        var mySwiper = new Swiper('.recommend-products .swiper-container',{
            loop: true,
            autoplay: false,
            initialSlide:slidIndex,
            pagination : '.recommend-products .pagination',
            paginationClickable:true,
            onSlideChangeEnd: function(e){
                slidIndex = e.activeLoopIndex;
                sessionStorage.setItem('slidIndex',slidIndex);

            },
        });
        $('.recommend-products .swiper-button-prev').on('click', function(e){
            e.preventDefault()
            mySwiper.swipePrev();
        });
        $('.recommend-products .swiper-button-next').on('click', function(e){
            e.preventDefault()
            mySwiper.swipeNext();
        });
    })
</script>